﻿<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeBehind="Default.aspx.vb" Inherits="TimeBooking._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<script lang="ja" type="text/javascript">
        function tall(A, tAll) {
            var d1 = document.getElementById(A)

        }
        function JvfunonBlur(A, B, C, D, E, F, G, total) {
            
            var d1 = document.getElementById(A).value;
            var d2 = document.getElementById(B).value;
            var d3 = document.getElementById(C).value;
            var d4 = document.getElementById(D).value;
            var d5 = document.getElementById(E).value;
            var d6 = document.getElementById(F).value;
            var d7 = document.getElementById(G).value;
       
            if (d1 == '') { d1 = 0 };
            if (d2 == '') { d2 = 0 };
            if (d3 == '') { d3 = 0 };
            if (d4 == '') { d4 = 0 };
            if (d5 == '') { d5 = 0 };
            if (d6 == '') { d6 = 0 };
            if (d7 == '') { d7 = 0 };

            var tot = +d1 + +d2 + +d3 + +d4 + +d5 + +d6 + +d7;
          if (tot == '0'){}else{document.getElementById(total).value = tot;}
            

           <%-- alert("Hey");
            var tue = document.getElementById(A).value;
            document.getElementById(B).value = tue;
            alert(tue);
            var grid = document.getElementById('<%=GridView1.ClientID %>');
           var col1;
           var totalcol1 = 0;

           var col2;
           var totalcol2 = 0;


           for (i = 0; i < grid.rows.length; i++) {
               col1 = grid.rows[i].cells[0];
               col2 = grid.rows[i].cells[1];

               for (j = 0; j < col1.childNodes.length; j++) {
                   if (col1.childNodes[j].type == "text") {
                       if (!isNaN(col1.childNodes[j].value) && col1.childNodes[j].value != "") {
                           totalcol1 += parseInt(col1.childNodes[j].value)
                       }
                   }
               }

               for (j = 0; j < col2.childNodes.length; j++) {
                   if (col2.childNodes[j].type == "text") {
                       if (!isNaN(col2.childNodes[j].value) && col2.childNodes[j].value != "") {
                           totalcol2 += parseInt(col2.childNodes[j].value)
                       }
                   }
               }
           }
           document.getElementById('<%=txttotal1.ClientID %>').value = totalcol1;
        document.getElementById('<%=txttotal2.ClientID %>').value = totalcol2;--%>
       }

    </script>
    <div>
        <table>
            <tr>
                <td align="right">
                    <asp:Label ID="lbEmpName" runat="server" Text="Employee:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="EmployeeName" runat="server" Enabled =" false"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="Label1" runat="server" Text="Group:"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtGroupName" runat="server" Enabled="false"></asp:TextBox>
                </td>
            </tr>
        </table>
    <br />    
    </div>
     <div>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Height="58px" RowStyle-HorizontalAlign="Center" Width="839px" style="margin-right: 0px" ShowFooter="True" >
        <Columns>
            <asp:TemplateField HeaderText="Name" HeaderStyle-HorizontalAlign="Center">
                <FooterTemplate>
                    <asp:Label ID="Label2" runat="server" Font-Bold="True" Font-Size="Larger" Text="Total"></asp:Label>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:DropDownList ID="DropDownList1" runat="server" Height="20px" Width="176px">
                        <asp:ListItem>Select</asp:ListItem>
                        <asp:ListItem>04.00020.TGF.001</asp:ListItem>
                        <asp:ListItem>JUR-ATEC</asp:ListItem>
                        <asp:ListItem>O/H-ATEC</asp:ListItem>
                        <asp:ListItem>COM-ATEC</asp:ListItem>
                        <asp:ListItem>HOL-ATEC</asp:ListItem>
                        <asp:ListItem>VAC-ATEC</asp:ListItem>
                        <asp:ListItem>SIC-ATEC</asp:ListItem>
                    </asp:DropDownList>
                </ItemTemplate>

<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                <ItemStyle HorizontalAlign="Center" Width="100px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Sun" HeaderStyle-HorizontalAlign="Center" FooterStyle-HorizontalAlign="Center">
                <FooterTemplate>
                    <asp:TextBox ID="txtTSun" runat="server" Width="40px"></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:TextBox ID="txtSun" runat="server" Width="40px"></asp:TextBox>
                </ItemTemplate>

<FooterStyle HorizontalAlign="Center"></FooterStyle>

                <HeaderStyle Wrap="True" VerticalAlign="Middle" Width="100px" />
                <ItemStyle HorizontalAlign="Center" Width="70px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Mon" HeaderStyle-HorizontalAlign="Center" FooterStyle-HorizontalAlign="Center">
                <FooterTemplate>
                    <asp:TextBox ID="txtTMon" runat="server" Width="40px"></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:TextBox ID="txtMon" runat="server" Width="40px"></asp:TextBox>
                </ItemTemplate>

<FooterStyle HorizontalAlign="Center"></FooterStyle>

<HeaderStyle HorizontalAlign="Center" Width="100px"></HeaderStyle>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Tue" HeaderStyle-HorizontalAlign="Center" FooterStyle-HorizontalAlign="Center">
                <FooterTemplate>
                    <asp:TextBox ID="txtTTue" runat="server" Width="40px"></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:TextBox ID="txtTue" runat="server" Width="40px"></asp:TextBox>
                </ItemTemplate>

<FooterStyle HorizontalAlign="Center"></FooterStyle>

<HeaderStyle HorizontalAlign="Center" Width="100px"></HeaderStyle>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Wed" FooterStyle-HorizontalAlign="Center">
                <FooterTemplate>
                    <asp:TextBox ID="txtTWed" runat="server" Width="40px"></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:TextBox ID="txtWed" runat="server" Width="40px"></asp:TextBox>
                </ItemTemplate>

<FooterStyle HorizontalAlign="Center"></FooterStyle>

                <HeaderStyle HorizontalAlign="Center" Width="100px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Thur" FooterStyle-HorizontalAlign="Center">
                <FooterTemplate>
                    <asp:TextBox ID="txtTThur" runat="server" Width="40px"></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:TextBox ID="txtThur" runat="server" Width="40px"></asp:TextBox>
                </ItemTemplate>

<FooterStyle HorizontalAlign="Center"></FooterStyle>

                <HeaderStyle HorizontalAlign="Center" Width="100px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Fri" FooterStyle-HorizontalAlign="Center">
                <FooterTemplate>
                    <asp:TextBox ID="txtTFri" runat="server" Width="40px"></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:TextBox ID="txtFri" runat="server" Width="40px"></asp:TextBox>
                </ItemTemplate>

<FooterStyle HorizontalAlign="Center"></FooterStyle>

                <HeaderStyle HorizontalAlign="Center" Width="100px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Sat" FooterStyle-HorizontalAlign="Center">
                <FooterTemplate>
                    <asp:TextBox ID="txtTSat" runat="server" Width="40px"></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:TextBox ID="txtSat" runat="server" Width="40px"></asp:TextBox>
                </ItemTemplate>

<FooterStyle HorizontalAlign="Center"></FooterStyle>

                <HeaderStyle HorizontalAlign="Center" Width="100px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Total" FooterStyle-HorizontalAlign="Center">
                <FooterTemplate >
                    <asp:TextBox ID="txtTotalAll" runat="server" Width="40px"></asp:TextBox>
                </FooterTemplate>
                <ItemTemplate>
                    <asp:TextBox ID="txtTotal" runat="server" Width="40px" Enabled="false"></asp:TextBox>
                </ItemTemplate>

<FooterStyle HorizontalAlign="Center"></FooterStyle>

                <HeaderStyle HorizontalAlign="Center" Width="100px" />
            </asp:TemplateField>
        </Columns>
        <FooterStyle BackColor="#33CCFF" />
        <HeaderStyle Wrap="True" HorizontalAlign="Right" />
        <RowStyle HorizontalAlign="Center" VerticalAlign="Middle" />
       
    </asp:GridView>
    
         <br />
         <%--<asp:Table ID="tbl" runat="server" GridLines="Both" Width="836px">
             <asp:TableRow>
                 <asp:TableHeaderCell Text="Total" BackColor="#7ab4b8" Width="176px"></asp:TableHeaderCell>
                 <asp:TableCell><asp:TextBox ID="txtSun" runat="server" Width="40px"></asp:TextBox></asp:TableCell>
                 <asp:TableCell><asp:Label ID="tSun" runat="server" ></asp:Label></asp:TableCell>
                 <asp:TableCell><asp:Label ID="tMon" runat="server" ></asp:Label></asp:TableCell>
                 <asp:TableCell><asp:Label ID="tTue" runat="server"></asp:Label></asp:TableCell>
                 <asp:TableCell><asp:Label ID="tWed" runat="server"></asp:Label></asp:TableCell>
                 <asp:TableCell><asp:Label ID="tThur" runat="server" ></asp:Label></asp:TableCell>
                 <asp:TableCell><asp:Label ID="tFri" runat="server" ></asp:Label></asp:TableCell>
                 <asp:TableCell><asp:Label ID="tSat" runat="server" ></asp:Label></asp:TableCell>
                 
             </asp:TableRow>
         </asp:Table>--%>
    <table>
        <tr>
            <td>
                <asp:Label ID="lb" runat="server" Text="Signature:"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtSignature" runat="server"></asp:TextBox>
            </td>
            <td>
                <asp:Button ID="btnSubmit" runat="server" Text="Submit" />
            </td>
        </tr>
    </table>
    
</div>
       <br />
    

   
</asp:Content>
